﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Ceremony.API.Model
{
    public class BobingUser
    {
        /// <summary>
        /// Id
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 授权码
        /// </summary>
        public string AuthorizationCode { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsRemove { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 次数
        /// </summary>
        public int Times { get; set; }

        private readonly List<BobingPrizeResult> _bobingPrizeResults;

        public IReadOnlyCollection<BobingPrizeResult> BobingPrizeResults => _bobingPrizeResults;

        private BobingUser()
        {
            _bobingPrizeResults = new List<BobingPrizeResult>();
        }

        public BobingUser(string authorizationCode,string userName,int times)
        {
            this.AuthorizationCode = authorizationCode;
            this.UserName = userName;
            this.Times = times;
            this.CreateTime = DateTime.Now;
        }
    }
}
